
var _debug;
bt.module({builder: function(bt) {
    var j$ = jQuery;

    j$(document).ready(function() {
        j$(".map-mask-fullscreen").click(function() {
            bt.misc.showPopup(j$(".map-popup"));
            bt.gmap.initMapScript(function() {
                var popup_map = bt.places.initialize("popup-map", {
                    minZoom: 2,
                    maxZoom: 13,
                    mapTypeId: google.maps.MapTypeId.ROADMAP});
                _debug = popup_map;
                bt.gmap.refreshMap(popup_map);
            });
        });

        j$(".trips .photo img").load(function() {
            bt.misc.centerAlignImg(j$(this), 238, 310, false);
        });
        j$(".trips .photo img").each(function() {
            bt.misc.centerAlignImg(j$(this), 238, 310, false);
        });

        // Load sections
        j$.ajax({
            url: j$(".wish-to-go-section").data("url"),
            success: function(resp) {
                j$(".wish-to-go-section").html(resp);
            }
        });
        j$.ajax({
            url: j$(".liked-section").data("url"),
            success: function(resp) {
                j$(".liked-section").html(resp);
            }
        });
    });

}});
